var Radio = require('./radio');

var inforObj = {"radioName": '"music radio"', "radioFM": "FM 106.7"};
var radio = new Radio(inforObj);

radio.on("open", function(){
    console.log(radio.radioName + " " + radio.radioFM + " " + "opened");
})

radio.on("close", function(){
    console.log(radio.radioName + " " + radio.radioFM + " " + "closed");
})

radio.emit("open");

setTimeout(() => {
    console.log("lalala...");
    radio.emit("close");
},2000)
